package com.kanche.bigbaby.collection;

import android.app.AlertDialog;
import android.app.Service;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.IBinder;
import android.view.WindowManager;

public class PhotoService extends Service {
    public PhotoService() {
    }

    @Override
    public void onCreate() {
         super.onCreate();

    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        AlertDialog.Builder builder = new AlertDialog.Builder(getApplicationContext());
        builder.setTitle("温馨提示");
        builder.setCancelable(false);
        builder.setMessage("为避免图片被裁剪,请把相机横着拍哦！！亲");
        builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {

            }
        });
        AlertDialog alertDialog = builder.create();
        alertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
        alertDialog.show();
        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }
}
